package cn.yuanqiao.manage.service;

import cn.yuanqiao.manage.domain.YqFields;
import cn.yuanqiao.manage.domain.YqdaMdataList;
import cn.yuanqiao.manage.domain.YqdaRelevance;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;

import java.util.List;
import java.util.Map;

/**
 * 元数据明细Service接口
 * 
 * @author yuanqiao
 * @date 2023-06-09
 */
public interface IYqdaMdataListService
{
    /**
     * 查询元数据明细
     * 
     * @param id 元数据明细主键
     * @return 元数据明细
     */
    public YqdaMdataList selectYqdaMdataListById(Long id);

    Map<String,Object> selectYqdaMdataListByIdAll(Long id);

    /**
     * 查询元数据明细列表
     * 
     * @param yqdaMdataList 元数据明细
     * @return 元数据明细集合
     */
    public List<YqdaMdataList> selectYqdaMdataListList(YqdaMdataList yqdaMdataList);

    /**
     * 新增元数据明细
     * @return 结果
     */
    //public int insertYqdaMdataList(HddaMDataList yqdaMdataList);
    public int insertYqdaMdataList(String ids,Long groupId);

    /**
     * 修改元数据明细
     * 
     * @param yqdaMdataList 元数据明细
     * @return 结果
     */
    public int updateYqdaMdataList(YqdaMdataList yqdaMdataList, String ids);

    /**
     * 批量删除元数据明细
     * 
     * @param ids 需要删除的元数据明细主键集合
     * @return 结果
     */
    public int deleteYqdaMdataListByIds(Long[] ids);

    /**
     * 删除元数据明细信息
     * 
     * @param id 元数据明细主键
     * @return 结果
     */
    public int deleteYqdaMdataListById(Long id);

    List<YqFields> getGroupDataList(YqFields yqfields, Long groupId);

    String copyIsRepeat(String ids, Long groupId,Integer type);

    int copyToGroup(String ids, Long groupId, Integer type);

    void importHddaMDataList(List<YqdaMdataList> dataLists, Long groupId, Integer type);

    List<Map<String,Object>> selectYqdaMdataListListforshy(Long groupId,Integer type,String fieldCaption,String fieldName,Long categoryId);

    Integer addmdatatoshy(JSONArray ids, Integer type, Long categoryId, Long groupId);

    Integer deletemdatafromshy(JSONArray ids, Integer type, Long categoryId, Long groupId);

    List<Map<String, Object>> getrelevancefield(JSONObject json);

    int addrelevance(JSONObject json);

    int editrele(YqdaRelevance relevance);

    int delterele(JSONObject json);

    YqdaRelevance getreledetail(Long id);

    List<YqdaRelevance> getrelevancelist(JSONObject json);

    int batchUpdateYqdaMdataList(YqdaMdataList yqdaMdataList, String ids);

    boolean moveDown(Long metadataListIds, Long groupId, Long categoryId, Integer type);

    boolean moveUp(Long metadataListIds, Long groupId, Long categoryId, Integer type);

    List<YqdaMdataList> selectYqdaMdataListListforexport(Long groupId, Integer type, String fieldName, List ids);
}
